home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / diskproc / space.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  2.9 KB  |  86 lines

  1. /*
  2.  *   $RCSfile: space.c,v $  
  3.  *   $Revision: 1.1.1.1 $  
  4.  *   $Date: 1996/05/04 21:56:07 $      
  5.  */ 
  6. /**********************************************************************
  7. * EXODUS Database Toolkit Software
  8. * Copyright (c) 1991 Computer Sciences Department, University of
  9. *                    Wisconsin -- Madison
  10. * All Rights Reserved.
  11. *
  12. * Permission to use, copy, modify and distribute this software and its
  13. * documentation is hereby granted, provided that both the copyright
  14. * notice and this permission notice appear in all copies of the
  15. * software, derivative works or modified versions, and any portions
  16. * thereof, and that both notices appear in supporting documentation.
  17. *
  18. * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
  19. * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.  
  20. * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  21. * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  22. *
  23. * The EXODUS Project Group requests users of this software to return 
  24. * any improvements or extensions that they make to:
  25. *
  26. *   EXODUS Project Group 
  27. *     c/o David J. DeWitt and Michael J. Carey
  28. *   Computer Sciences Department
  29. *   University of Wisconsin -- Madison
  30. *   Madison, WI 53706
  31. *
  32. *     or exodus@cs.wisc.edu
  33. *
  34. * In addition, the EXODUS Project Group requests that users grant the 
  35. * Computer Sciences Department rights to redistribute these changes.
  36. **********************************************************************/
  37. #include "sysdefs.h"
  38. #include "ess.h"
  39. #include "checking.h"
  40. #include "trace.h"
  41. #include "error.h"
  42. #include "list.h"
  43. #include "tid.h"
  44. #include "io.h"
  45. #include "lock.h"
  46. #include "object.h"
  47. #include "msgdefs.h"
  48. #include "disk.h"
  49. #include "volume.h"
  50. #include "queue_consist.h"
  51.  
  52. #include "queues.h"
  53. #include "diskproc_globals.h"
  54. #include "diskproc_intfuncs.h"
  55. #include "diskproc_extfuncs.h"
  56.  
  57. int                Socket;                /* for comm with server */
  58. char            *ShmAddress;        /* == ShmAddress in the server */
  59. int                ShmId;                /* == ShmId in the server */
  60. char            *TraceName = "DISKRW";    /* == TraceName in server */
  61. TRACEFLAGS        TraceFlags;            /* == TraceFlags in server */
  62. TRACELEVEL        TraceLevel;            /* == TraceLevel in server */
  63. struct shmid_ds    Shmstruct;            /* used only here, for error checking */
  64. int                Fd;                    /* disk device */
  65.  
  66. char            *DiskName;            /* DiskName in server  */
  67.  
  68.  
  69. int                Parent=0;
  70. int                SemId;        /* corresponds to SemId in server */
  71. char            SemNum;        /* ONE BYTE */
  72. int                NumMsgBufs;    /* corresponds to NumMsgBufs in server */
  73. QUEUEPAIR        *DiskQueue; /* the one queue for our disk only */
  74. ProcessIdentity process_identity; /* queues.h */
  75. MUTEX             *Replies; /* queues.h */
  76.  
  77. /*
  78.  *    These variables hold info about whether the volume is a
  79.  *    raw device.  If so, a buffer is allocated so that contiguous
  80.  *    pages can be placed into it for faster write performance.
  81.  */
  82. BOOL             RawDev = FALSE;
  83. char             *BlockBuf = NULL;
  84. int              BlockBufSize = 0;
  85.  
  86.